package com.nhjf.model.teachers;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.student.Student;
import com.nhjf.model.system.Organization;
import com.nhjf.model.system.User;
@SuppressWarnings("serial")
@Entity
@Table(name = "organization_has_student")
public class OrganizationHasStudent extends BaseModel{
	/**
	  * 机构组织和学生的关联表主键
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	  * 组织机构关联
	 */
	@OneToOne
    @JoinColumn(name = "organization_id")
	private Organization organization;
	/**
	  * 学生机构关联
	 */
    @OneToOne
    @JoinColumn(name = "student_id")
	private Student student;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}
	
	
	
}
